package com.example.alldemo.service.impl;


import com.example.alldemo.Dao.TestMapper;
import com.example.alldemo.entity.ex;
import com.example.alldemo.entity.show;
import com.example.alldemo.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Impl implements TestService {

    @Autowired
    private TestMapper testMapper;

    @Override
    @Cacheable(value="getalluser")
    public List<ex> getalluser(show s) {
        List<ex> getalluser = testMapper.getalluser(s);
        return getalluser;
    }

    @Override
    @Cacheable(value="getallusertatoal")
    public Integer getallusertatoal(show s) {
        System.out.println("测试输出");
        return testMapper.getallusertatoal(s);

    }

    @Override
   @Cacheable(value = "getAll")
    public List<ex> getAll() {
        List<ex> all = testMapper.getAll();
        return all;
    }

}
